<template>
  <div>
    <deptAndDuty type-show="dept" @deptChange="deptChange" :deptId="form.dutyDept" :disabled="!isEdit"></deptAndDuty>
    <p>----------部门----------</p>
    <deptAndDuty type-show="duty" @dutyChange="dutyChange"  :deptId="form.dutyDept" :dutyId="form.dutyUser" :disabled="!isEdit"></deptAndDuty>

  </div>
</template>

<script>
export default {
    name:'khk',
    data(){
        return{
            form:{},
            isEdit:true 
        }
    },
    methods:{
    // 组件传回的部门id
    deptChange(val){
      this.$set(this.form,'dutyDept',val)
      // this.form.dutyDept = val
    },
    // 组件传回的人员id
    dutyChange(val){
      this.form.dutyUser = val
    },
    }
}
</script>

<style>

</style>